package com.haierp.controller.bi;

import java.io.ByteArrayOutputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.jetty.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.haierp.mapper.PurchaseStorageDetailMapper;
import com.haierp.mapper.bi.BiShipMapper;
import com.haierp.mapperBi.BiDeliverPersonMapper;
import com.haierp.model.ShippingOrder;
import com.haierp.model.ShippingTrackPx;
import com.haierp.model.bi.BiDeliverGoods;
import com.haierp.model.bi.BiDeliverPerson;
import com.haierp.model.bi.BiDeliverPrescription;
import com.haierp.model.bi.BiLogisticAvgtime;
import com.haierp.model.bi.BiPackagePerson;
import com.haierp.model.bi.BiSaleInputPerson;
import com.haierp.model.bi.BiShip;
import com.haierp.model.bi.TaskNostockupReport;
import com.haierp.model.purchase.PurchaseStorageDetail;
import com.haierp.service.IShippingOrderService;
import com.haierp.service.IShippingTrackPxService;
import com.haierp.service.bi.IBiShipService;
import com.haierp.service.logistics.ISiFangService;
import com.haierp.util.DateUtil;
import com.haierp.util.ExcelTool.ExcelHelper;
import com.haierp.vo.json.PicModel;
import com.wangzhixuan.commons.base.BaseController;
import com.wangzhixuan.commons.shiro.ShiroUser;
import com.wangzhixuan.commons.utils.HaiJsonUtils;

@Controller
@RequestMapping("/bi/ship")
public class BiShipController extends BaseController {
	protected Logger logger = LogManager.getLogger(getClass());
	@Autowired
	private IBiShipService biShipService;
	@Autowired
	private IShippingOrderService shippingOrderService;
	@Autowired
	private ISiFangService siFangService;
	@Autowired
	private IShippingTrackPxService shippingTrackPxService;
	@Autowired
	private BiShipMapper biShipMapper;
	@Autowired
	private BiDeliverPersonMapper biDeliverPersonMapper;
	@Autowired
	private PurchaseStorageDetailMapper purchaseStorageDetailMapper;
	
	@RequestMapping("/selectBiShipReportByGmtCreate")
	public String selectBiShipReportByGmtCreate(HttpServletRequest request){
		ShiroUser one = this.getShiroUser();
		List<BiDeliverGoods> shipListCurrent = biShipMapper.selectBiShipReportByGmtCreate(one.getCompanyId());
		List<BiDeliverGoods> shipList = biShipService.selectBiShipReportByGmtCreate(one.getCompanyId());
		shipList.addAll(0,shipListCurrent);
		request.setAttribute("shipList", shipList);
		return "bi/shipReport";
	}
	
	@RequestMapping("/selectBiDeliveryReportByGmtCreate")
	public String selectBiDeliveryReportByGmtCreate(HttpServletRequest request) {
		ShiroUser one = this.getShiroUser();
		List<BiDeliverPerson> shipDeliveryList = biShipService.selectBiShipDeliveryReportByGmtCreate(one.getCompanyId());
		List<BiDeliverPerson> shipDeliveryListCurrent = biShipMapper.selectBiShipDeliveryReportByGmtCreate();
		shipDeliveryList.addAll(0, shipDeliveryListCurrent);

		List<BiDeliverPerson> shipMonth = biDeliverPersonMapper.selectBiDeliverPersonByMonth(one.getCompanyId());
		List<BiDeliverPerson> shipMonthCurrent = biShipMapper.selectBiShipDeliveryReportByMonth(one.getCompanyId());
		shipMonth.addAll(0, shipMonthCurrent);

		Map<String, BiDeliverPerson> shipMap = new HashMap<String,BiDeliverPerson>();
		Map<String, BiDeliverPerson> shipMapByName = new HashMap<String,BiDeliverPerson>();
		shipDeliveryList.forEach(biShip -> {
			if(shipMap.containsKey(biShip.getDimensionDate())) {
				BiDeliverPerson biShipDate = shipMap.get(biShip.getDimensionDate());
				biShipDate.setCount(biShipDate.getCount()+1);
				if(shipMapByName.containsKey(biShip.getDimensionDate()+biShip.getDeliverPerson())) {
					BiDeliverPerson biShipName = shipMapByName.get(biShip.getDimensionDate()+biShip.getDeliverPerson());
					biShipName.setNameCount(biShipName.getNameCount()+1);
					biShipName.setDeliverItemNumTotal(biShipName.getDeliverItemNumTotal()+biShip.getDeliverItemNum());
					biShipName.setDeliverPkgNumTotal(biShipName.getDeliverPkgNumTotal()+biShip.getDeliverPkgNum());
				} else {
					BiDeliverPerson biShipName = new BiDeliverPerson();
					biShipName.setNameCount(1);
					biShipName.setDeliverItemNumTotal(biShip.getDeliverItemNum());
					biShipName.setDeliverPkgNumTotal(biShip.getDeliverPkgNum());
					shipMapByName.put(biShip.getDimensionDate()+biShip.getDeliverPerson(), biShipName);
				}
			} else {
				BiDeliverPerson biShipDate = new BiDeliverPerson();
				biShipDate.setCount(1);
				shipMap.put(biShip.getDimensionDate(), biShipDate);
				BiDeliverPerson biShipName = new BiDeliverPerson();
				biShipName.setNameCount(1);
				biShipName.setDeliverItemNumTotal(biShip.getDeliverItemNum());
				biShipName.setDeliverPkgNumTotal(biShip.getDeliverPkgNum());
				shipMapByName.put(biShip.getDimensionDate()+biShip.getDeliverPerson(), biShipName);
			}
		});
		request.setAttribute("shipMap", shipMap);
		request.setAttribute("shipMapByName", shipMapByName);
		request.setAttribute("shipDeliveryList", shipDeliveryList);
		request.setAttribute("shipMonth", shipMonth);
		return "bi/shipDeliveryReport";
	}

	@RequestMapping("/selectBiPackerReportByPackageTime")
	public String selectBiPackerReportByPackageTime(HttpServletRequest request) {
		ShiroUser one = this.getShiroUser();
		List<BiPackagePerson> shipDeliveryListCurrent = biShipMapper.selectBiShipPackerReportByPackageTime();
		List<BiPackagePerson> shipDeliveryList = biShipService.selectBiShipPackerReportByPackageTime(one.getCompanyId());
		shipDeliveryList.addAll(0, shipDeliveryListCurrent);
		Map<String, BiPackagePerson> shipMap = new HashMap<String,BiPackagePerson>();
		shipDeliveryList.forEach(biShip -> {
			if(shipMap.containsKey(biShip.getDimensionDate())) {
				BiPackagePerson biShipNew = shipMap.get(biShip.getDimensionDate());
				biShipNew.setCount(biShipNew.getCount()+1);
				biShipNew.setPackageItemNumTotal(biShipNew.getPackageItemNumTotal()+biShip.getPackageItemNum());
				biShipNew.setPackagePkgNumTotal(biShipNew.getPackagePkgNumTotal()+biShip.getPackagePkgNum());
			} else {
				BiPackagePerson biShipNew = new BiPackagePerson();
				biShipNew.setCount(1);
				biShipNew.setPackageItemNumTotal(biShip.getPackageItemNum());
				biShipNew.setPackagePkgNumTotal(biShip.getPackagePkgNum());
				shipMap.put(biShip.getDimensionDate(), biShipNew);
			}
		});
		
		request.setAttribute("shipMap", shipMap);
		request.setAttribute("shipDeliveryList", shipDeliveryList);
		return "bi/shipPackerReport";
	}

	@RequestMapping("/selectBiShipReportBySalesName")
	public String selectBiShipReportBySalesName(HttpServletRequest request){
		boolean flage = false;
		ShiroUser one = this.getShiroUser();
		BiShip biShip = new BiShip();
		biShip.setCompanyId(one.getCompanyId());
		if(StringUtil.isNotBlank(request.getParameter("startTime")) && StringUtil.isNotBlank(request.getParameter("endTime"))) {
			biShip.setStartTime(request.getParameter("startTime"));
			biShip.setEndTime(request.getParameter("endTime"));
			List<BiShip> shipMouthList = biShipService.selectBiShipDeliveryReportByMouth(biShip);
			flage  = true;
			request.setAttribute("shipMouthList", shipMouthList);
			request.setAttribute("startTime", biShip.getStartTime());
			request.setAttribute("endTime", biShip.getEndTime());
		} else {
			List<BiShip> shipSalesNameList= biShipService.selectBiShipDeliveryReportBySalesName(one.getCompanyId());
			List<BiShip> shipSalesNameMouthList= biShipService.selectBiShipDeliveryReportBySalesNameMouth(one.getCompanyId());
			//List<BiShip> sellerNameList = biShipService.selectBiSellerName(one.getCompanyId());
			//request.setAttribute("sellerNameList", sellerNameList);
			request.setAttribute("shipSalesNameList", shipSalesNameList);
			request.setAttribute("shipSalesNameMouthList", shipSalesNameMouthList);
		}
		request.setAttribute("flage", flage);
		return "bi/shipReportByName";
	}

	@RequestMapping("/selectBiShipReportByUserCreate")
	public String selectBiShipReportByUserCreate(HttpServletRequest request){
		ShiroUser one = this.getShiroUser();
		boolean flage = false;
		if(StringUtil.isNotBlank(request.getParameter("startTime")) && StringUtil.isNotBlank(request.getParameter("endTime"))) {
			BiShip biShip = new BiShip();
			biShip.setStartTime(request.getParameter("startTime"));
			biShip.setEndTime(request.getParameter("endTime"));
			biShip.setCompanyId(one.getCompanyId());
			List<BiShip> shipMouthList = biShipService.selectBiShipDeliveryReportByMouthOne(biShip);
			flage  = true;
			request.setAttribute("shipMouthList", shipMouthList);
			request.setAttribute("startTime", biShip.getStartTime());
			request.setAttribute("endTime", biShip.getEndTime());
		} else {
			List<BiSaleInputPerson> shipSalesNameList = biShipService.selectBiShipDeliveryReportByUserCreate(one.getCompanyId());
			Map<String, BiSaleInputPerson> shipMap = new HashMap<String,BiSaleInputPerson>();
			shipSalesNameList.forEach(biShipDetail ->{
				if(shipMap.containsKey(biShipDetail.getDimensionDate())) {
					BiSaleInputPerson biSaleInputPerson = shipMap.get(biShipDetail.getDimensionDate());
					biSaleInputPerson.setCount(biSaleInputPerson.getCount()+1);
					biSaleInputPerson.setTotalOuterOrderNum(biSaleInputPerson.getTotalOuterOrderNum()+biShipDetail.getEntryOuterNum());
				} else {
					BiSaleInputPerson biSaleInputPerson = new BiSaleInputPerson();
					biSaleInputPerson.setCount(1);
					biSaleInputPerson.setTotalOuterOrderNum(biShipDetail.getEntryOuterNum());					                                                
					shipMap.put(biShipDetail.getDimensionDate(), biSaleInputPerson);
				}
			});
			request.setAttribute("shipMap", shipMap);
			request.setAttribute("shipSalesNameList", shipSalesNameList);
		}
		request.setAttribute("flage", flage);
		return "bi/shipReportByUserCreate";
	}
	
	@RequestMapping("/selectBinNoStockReport")
	public String selectBinNoStockReport(HttpServletRequest request){
		ShiroUser one = this.getShiroUser();
		List<TaskNostockupReport> shipList= biShipService.selectBiShiPNoStockReportByDate(one.getCompanyId());
		if("winnie".equals(one.getLoginName()) || "xunyifei".equals(one.getLoginName()) || "winnie2".equals(one.getLoginName())){
			BiShip BiShipVolume = biShipService.selectBiShiPNoStockVolumeReport(one.getCompanyId());
			request.setAttribute("BiShipVolume", BiShipVolume);
		}
		request.setAttribute("shipList", shipList);
		return "bi/taskNoStockReport";
	}
	
	@RequestMapping("/selectPxImproperReport")
	public String selectPxImproperReport(HttpServletRequest request){
		ShiroUser one = this.getShiroUser();
		String packageNumber = request.getParameter("packageNumber");
		BiShip biShip = new BiShip();
		if(StringUtils.isNotBlank(packageNumber)){
			biShip.setPackageNumber(packageNumber);
			request.setAttribute("packageNumber", biShip.getPackageNumber());
		}
		biShip.setCompanyId(one.getCompanyId());
		List<BiShip> shipList= biShipService.selectPxImproperReport(biShip);
		request.setAttribute("shipList", shipList);
		return "bi/pxImproperReport";
	}
	
	@RequestMapping("/selectShippingReportAvg")
	public String selectShippingReportAvg(HttpServletRequest request){
		ShiroUser one = this.getShiroUser();
		List<BiLogisticAvgtime> shipList= biShipService.selectShippingReportAvg(one.getCompanyId());
		Map<String, BiLogisticAvgtime> shipMap = new HashMap<String,BiLogisticAvgtime>();
		shipList.forEach(biShipDetail ->{
			if(shipMap.containsKey(biShipDetail.getDimensionDate())) {
				BiLogisticAvgtime biShipNew = shipMap.get(biShipDetail.getDimensionDate());
				biShipNew.setCount(biShipNew.getCount()+1);
			} else {
				BiLogisticAvgtime biShipNew = new BiLogisticAvgtime();
				biShipNew.setCount(1);
				shipMap.put(biShipDetail.getDimensionDate(), biShipNew);
			}
		});
		request.setAttribute("shipMap", shipMap);
		request.setAttribute("shipList", shipList);
		return "bi/logisticCompanyAvgReport";
	}

	// 异常包裹excel导出
	@RequestMapping("/exportExcel")
	@ResponseBody
	public ResponseEntity<byte[]> packageExportExcel(HttpServletRequest request) throws Exception {
		BiShip biShipone = new BiShip();
		List<BiShip> shipList = biShipService.selectPxImproperReport(biShipone);
		List<List<Object>> rowDatas = new ArrayList<>();
		if (shipList != null) {
			for (BiShip biShip : shipList) {
				List<Object> list = new ArrayList<>();

				list.add(biShip.getPackageNo()); // 包裹号
				list.add(biShip.getDimensionDate()); // 预报日期
				rowDatas.add(list);
			}
		}
		ExcelHelper excelHelper = new ExcelHelper();
		String[] columnTitles = new String[] { "包裹号", "预报日期" };
		Integer[] columnWidth = new Integer[] { 30, 15 };

		excelHelper.setOuterOrderToSheet("ImproperReport", columnTitles, rowDatas, columnWidth);

		ResponseEntity<byte[]> filebyte = null;
		ByteArrayOutputStream out = excelHelper.writeToByteArrayOutputStream();
		HttpHeaders headers = new HttpHeaders();
		headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
		String fileName = "4PX异常包裹(" + DateUtil.formatDate(new Date(), "yyyyMMdd") + ").xlsx";
		headers.setContentDispositionFormData("attachment", new String(fileName.getBytes("utf-8"), "ISO8859-1"));
		filebyte = new ResponseEntity<byte[]>(out.toByteArray(), headers, HttpStatus.OK);
		out.close();
		excelHelper.close();
		return filebyte;
	}
	
	@RequestMapping("/selectYkImproperReport")
	public String selectYkImproperReport(HttpServletRequest request){
		String packageNumber = request.getParameter("packageNumber");
		BiShip one = new BiShip();
		if(StringUtils.isNotBlank(packageNumber)){
			one.setPackageNumber(packageNumber);
			request.setAttribute("packageNumber", one.getPackageNumber());
		}
		List<BiShip> shipList= biShipService.selectYKImproperReport(one);
		request.setAttribute("shipList", shipList);
		return "bi/ykImproperReport";
	}
	
	// 邮客异常包裹excel导出
	@RequestMapping("/exportYkExcel")
	@ResponseBody
	public ResponseEntity<byte[]> packageExportYkExcel(HttpServletRequest request) throws Exception {
		BiShip one = new BiShip();
		List<BiShip> shipList = biShipService.selectYKImproperReport(one);
		List<List<Object>> rowDatas = new ArrayList<>();
		if (shipList != null) {
			for (BiShip biShip : shipList) {
				List<Object> list = new ArrayList<>();

				list.add(biShip.getPackageNo()); // 包裹号
				list.add(biShip.getDimensionDate()); // 预报日期
				list.add(biShip.getYkpackageNo()); // 邮客单号
				rowDatas.add(list);
			}
		}
		ExcelHelper excelHelper = new ExcelHelper();
		String[] columnTitles = new String[] { "包裹号", "预报单号","邮客单号"};
		Integer[] columnWidth = new Integer[] { 30, 30, 20};

		excelHelper.setOuterOrderToSheet("ImproperReport", columnTitles, rowDatas, columnWidth);

		ResponseEntity<byte[]> filebyte = null;
		ByteArrayOutputStream out = excelHelper.writeToByteArrayOutputStream();
		HttpHeaders headers = new HttpHeaders();
		headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
		String fileName = "邮客异常包裹(" + DateUtil.formatDate(new Date(), "yyyyMMdd") + ").xlsx";
		headers.setContentDispositionFormData("attachment", new String(fileName.getBytes("utf-8"), "ISO8859-1"));
		filebyte = new ResponseEntity<byte[]>(out.toByteArray(), headers, HttpStatus.OK);
		out.close();
		excelHelper.close();
		return filebyte;
	}
	/**
	 * 刷新异常包裹
	 * @param request
	 * @return
	 */
	@RequestMapping("/refreshPxImproperReport")
	public String refreshPxImproperReport(HttpServletRequest request) {
		List<ShippingOrder> Flist = shippingOrderService.queryAllFourPxTwo();// 所有走4PX的
		if (CollectionUtils.isNotEmpty(Flist)) {
			for (ShippingOrder shippingOrder : Flist) {
				try {
					EntityWrapper<ShippingTrackPx> entityWrapper = new EntityWrapper<ShippingTrackPx>();
					entityWrapper.where("shipping_no={0}", shippingOrder.getShippingNo());
					ShippingTrackPx one = shippingTrackPxService.selectOne(entityWrapper);
					if (one != null) {
						if (one.getIsGet() == null) {
							siFangService.shippingTrack(shippingOrder.getShippingNo());
							Thread.sleep(10);
						}
					} else {
						siFangService.shippingTrack(shippingOrder.getShippingNo());
					}
				} catch (Exception e) {
					logger.error("抓取物流轨迹定时任务(4PX)", e);
				}
			}
		}
		BiShip biShip = new BiShip();
		List<BiShip> shipList = biShipService.selectPxImproperReport(biShip);
		request.setAttribute("shipList", shipList);
		return "bi/pxImproperReport";
	}
	
	/**
	 * 手动更改包裹
	 * @param request
	 * @return
	 */
	@RequestMapping("/deletePackageNo")
	public String refreshPxImproperReport(HttpServletRequest request, String packageNo, String type) {
		String page = "";
		if (type.equals("4px")) {
			EntityWrapper<ShippingTrackPx> entityWrapper = new EntityWrapper<ShippingTrackPx>();
			entityWrapper.where("is_get is null AND shipping_no={0}", packageNo);
			ShippingTrackPx one = shippingTrackPxService.selectOne(entityWrapper);
			if (one != null) {
				one.setIsGet(1);
				shippingTrackPxService.updateById(one);
			} else {
				ShippingTrackPx one2 = new ShippingTrackPx();
				one2.setIsGet(1);
				one2.setShipperOrderNo(packageNo);
				one2.setGmtCreate(new Date());
				one2.setGmtModify(new Date());
				shippingTrackPxService.insert(one2);
			}
			BiShip biShipone = new BiShip();
			List<BiShip> shipList = biShipService.selectPxImproperReport(biShipone);
			request.setAttribute("shipList", shipList);
			page = "bi/pxImproperReport";
		} else {
			EntityWrapper<ShippingOrder> entityWrapper = new EntityWrapper<ShippingOrder>();
			entityWrapper.where("logistic_company={0} AND shipping_no={1}", type, packageNo);
			ShippingOrder one = shippingOrderService.selectOne(entityWrapper);
			if (one != null) {
				one.setTplPkgStatus("手动签收");
				shippingOrderService.updateById(one);
			}
			BiShip bone = new BiShip();
			List<BiShip> shipList = biShipService.selectYKImproperReport(bone);
			request.setAttribute("shipList", shipList);
			page = "bi/ykImproperReport";
		}
		return page;
	}
	/**
	 * 在途未入库sku报表
	 * @param request
	 * @return
	 */
	@RequestMapping("/selectTransNoinventoryReport")
	public String selectTransNoinventoryReport(HttpServletRequest request) {
		ShiroUser one = this.getShiroUser();
			List<BiShip> shipList = biShipService.selectTransNoinventoryReport(one.getCompanyId());
			for (BiShip biShip : shipList) {
				if(StringUtils.isNotBlank(biShip.getSkuPic())){
					PicModel pm = HaiJsonUtils.toBean(biShip.getSkuPic(), PicModel.class);
					String imgSrc = pm.getPicList().get(0).getUrl();
					biShip.setSkuPic(imgSrc);
				}
				EntityWrapper<PurchaseStorageDetail> entityWrapper = new EntityWrapper<PurchaseStorageDetail>();
				entityWrapper.where("sku_code={0} and shelf_no={1} and warehouse_id={2} and online_number IS NOT NULL and online_quantity > 0", biShip.getSkuNo(),biShip.getPositionNo(),biShip.getWarehouseId());
				List<PurchaseStorageDetail> purchaseStorageList = purchaseStorageDetailMapper.selectList(entityWrapper);
				String onlinNumber = "";
				if(purchaseStorageList.size() > 0 ) {
					for (PurchaseStorageDetail purchaseStorageDetail : purchaseStorageList) {
						onlinNumber  += "单号: "+purchaseStorageDetail.getOnlineNumber()+"  数量: "+purchaseStorageDetail.getOnlineQuantity()+";<br/>";
					}
					biShip.setOnlineNumber(onlinNumber);
				}
			}
			request.setAttribute("shipList", shipList);
		return "bi/transNoInventortReport";
	}
	
	@RequestMapping("/countMistakeMan")
	public String countMistakeMan(HttpServletRequest request) {
		List<BiShip> shipDeliveryList = biShipService.countMistakeMan();
		List<BiShip> shipDeliveryMonthList = biShipService.countMistakeManByMonth();
		Map<String, BiShip> shipMap = new HashMap<String,BiShip>();
		Map<String, BiShip> shipMonthMap = new HashMap<String,BiShip>();
		shipDeliveryList.forEach(biShip -> {
			if(shipMap.containsKey(biShip.getDimensionDate())) {
				BiShip biShipNew = shipMap.get(biShip.getDimensionDate());
				biShipNew.setCount(biShipNew.getCount()+1);
			} else {
				BiShip biShipNew = new BiShip();
				biShipNew.setCount(1L);
				shipMap.put(biShip.getDimensionDate(), biShipNew);
			}
		});
		shipDeliveryMonthList.forEach(biShip -> {
			if(shipMonthMap.containsKey(biShip.getDimensionDate())) {
				BiShip biShipNew = shipMonthMap.get(biShip.getDimensionDate());
				biShipNew.setCount(biShipNew.getCount()+1);
			} else {
				BiShip biShipNew = new BiShip();
				biShipNew.setCount(1L);
				shipMonthMap.put(biShip.getDimensionDate(), biShipNew);
			}
		});
		request.setAttribute("shipMap", shipMap);
		request.setAttribute("shipMonthMap", shipMonthMap);
		request.setAttribute("shipList", shipDeliveryList);
		request.setAttribute("shipDeliveryMonthList", shipDeliveryMonthList);
		return "bi/mistakeReport";
	}
	
	@RequestMapping("/shippingOrderAvg")
	public String countShippingOrderAvg(HttpServletRequest request) {
		List<BiDeliverPrescription> shipDeliveryList = biShipService.shippingOrderAvg();
		request.setAttribute("shipList", shipDeliveryList);
		return "bi/shippingOrderAvg";
	}
}

